package com.kvchen.designer.control
{
	import alternativa.gui.base.GUIobject;
	import alternativa.gui.container.linear.HBox;
	import alternativa.gui.container.linear.RelativeHBox;
	import alternativa.gui.enum.Align;
	import alternativa.gui.theme.defaulttheme.controls.slider.Slider;
	import alternativa.gui.theme.defaulttheme.controls.text.Label;
	import alternativa.gui.theme.defaulttheme.controls.text.TextInput;
	
	public class LabelSliderField extends RelativeHBox
	{
		private var _label:Label;
		private var _labelWidth:Number;
		private var _slider:Slider;
		private var _input:TextInput;
		private var _inputWidth:Number;
		
		public function LabelSliderField(label:String, min:Number, max:Number, value:Number, labelWidth:Number = 50, inputWidth:Number = 50)
		{
			this._labelWidth = labelWidth;
			this._inputWidth = inputWidth;
			
			super([.2, .6, .2], 5);
			
			this.align = Align.CENTER;
			
			_label = new Label(false);
			_label.text = label;
			_label.width = labelWidth;
			_label.y = 5;
			
			_slider = new Slider(max, value, 1);
			
			_input = new TextInput();
			_input.width = 50;
			
			addChild(_label);
			addChild(_slider);
			addChild(_input);
			
		}
	}
}